package com.xj.repositories;

import com.xj.entity.Article;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * @author xujiang
 * @date 2021/1/31 23:23
 */
public interface ArticleRepository extends ElasticsearchRepository<Article, Long> {
    List<Article> findByContent(String context);
    List<Article> findByTitleOrContent(String title, String context);
    List<Article> findByTitleOrContent(String title, String context, Pageable pageable);
}
